<template>
	<view id="dp-container">
		<block v-for="(setData, index) in pagecontent" :key="index">
			<block v-if="setData.temp == 'notice'">
				<dp-notice :params="setData.params" :data="setData.data"></dp-notice>
			</block>
			<block v-if="setData.temp == 'banner'">
				<dp-banner :params="setData.params" :data="setData.data"></dp-banner>
			</block>
			<block v-if="setData.temp == 'banner2'">
				<te-banner :params="setData.params" :data="setData.data"></te-banner>
			</block>
			<block v-if="setData.temp == 'banner3'">
				<te-mbanner :params="setData.params" :data="setData.tabdata"></te-mbanner>
			</block>
			<block v-if="setData.temp == 'search'">
				<dp-search :params="setData.params" :data="setData.data"></dp-search>
			</block>
			<block v-if="setData.temp == 'lbssearch'">
				<dp-lbs-search :params="setData.params" :data="setData.data"></dp-lbs-search>
			</block>
			<block v-if="setData.temp == 'text'">
				<dp-text :params="setData.params" :data="setData.data"></dp-text>
			</block>
			<block v-if="setData.temp == 'title'">
				<dp-title :params="setData.params" :data="setData.data"></dp-title>
			</block>
			<block v-if="setData.temp == 'dhlist'">
				<dp-dhlist :params="setData.params" :data="setData.data"></dp-dhlist>
			</block>
			<block v-if="setData.temp == 'line'">
				<dp-line :params="setData.params" :data="setData.data"></dp-line>
			</block>
			<block v-if="setData.temp == 'blank'">
				<dp-blank :params="setData.params" :data="setData.data"></dp-blank>
			</block>
			<block v-if="setData.temp == 'menu'">
				<dp-menu :params="setData.params" :data="setData.data"></dp-menu>
			</block>
			<block v-if="setData.temp == 'map'">
				<dp-map :params="setData.params" :data="setData.data"></dp-map>
			</block>
			<block v-if="setData.temp == 'cube'">
				<dp-cube :params="setData.params" :data="setData.data"></dp-cube>
			</block>
			<block v-if="setData.temp == 'picture'">
				<dp-picture :params="setData.params" :data="setData.data"></dp-picture>
			</block>
			<block v-if="setData.temp == 'pictures'">
				<dp-pictures :params="setData.params" :data="setData.data"></dp-pictures>
			</block>
			<block v-if="setData.temp == 'video'">
				<dp-video :params="setData.params" :data="setData.data"></dp-video>
			</block>
			<block v-if="setData.temp == 'tab'">
				<dp-tab :params="setData.params" :data="setData.data" :tabid="setData.id" :menuindex="menuindex"
					@getdata="getdata"></dp-tab>
			</block>
			<block v-if="setData.temp == 'tab2'">
				<te-tab :params="setData.params" :data="setData.data" :tabid="setData.id" :menuindex="menuindex"
					@getdata="getdata"></te-tab>
			</block>
			<block v-if="setData.temp == 'shop'">
				<dp-shop :params="setData.params" :data="setData.data" :shopinfo="setData.shopinfo"></dp-shop>
			</block>
			<block v-if="setData.temp == 'product'">
				<dp-product :params="setData.params" :data="setData.data" :menuindex="menuindex"></dp-product>
			</block>


			<block v-if="setData.temp == 'seckill'">
				<dp-seckill :params="setData.params" :data="setData.data" :menuindex="menuindex"></dp-seckill>
			</block>
			<block v-if="setData.temp == 'tuangou'">
				<dp-tuangou :params="setData.params" :data="setData.data" :menuindex="menuindex"></dp-tuangou>
			</block>

			<block v-if="setData.temp == 'coupon'">
				<dp-coupon :params="setData.params" :data="setData.data"></dp-coupon>
			</block>
			<block v-if="setData.temp == 'article'">
				<dp-article :params="setData.params" :data="setData.data"></dp-article>
			</block>
			<block v-if="setData.temp == 'business'">
				<dp-business :params="setData.params" :data="setData.data" :menuindex="menuindex"></dp-business>
			</block>
			<block v-if="setData.temp == 'button'">
				<dp-button :params="setData.params" :data="setData.data"></dp-button>
			</block>
			<block v-if="setData.temp == 'hotspot'">
				<dp-hotspot :params="setData.params" :data="setData.data"></dp-hotspot>
			</block>
			<block v-if="setData.temp == 'cover'">
				<dp-cover :params="setData.params" :data="setData.data"></dp-cover>
			</block>
			<block v-if="setData.temp == 'richtext'">
				<!-- #ifndef MP-WEIXIN -->
				<dp-richtext :params="setData.params" :data="setData.data" :content="setData.content"></dp-richtext>
				<!-- #endif -->
				<!-- #ifdef MP-WEIXIN -->
				<rich-text :nodes="setData.content"></rich-text>
				<!-- #endif -->
			</block>
			<block v-if="setData.temp == 'userinfo'">
				<dp-userinfo :params="setData.params" :data="setData.data" :content="setData.content"></dp-userinfo>
			</block>
			<block v-if="setData.temp == 'share-card'">
				<dp-share-card :params="setData.params" :data="setData.data"></dp-share-card>
			</block>
			<block v-if="setData.temp == 'step'">
				<dp-custom-swiper :params="setData.params" :data="setData.data"></dp-custom-swiper>
			</block>
			<block v-if="setData.temp == 'video-list'">
				<dp-videolive :params="setData.params" :data="setData.data"
					:video_lists="setData.video_lists"></dp-videolive>
			</block>
			<block v-if="setData.temp == 'location'">
				<dp-location :params="setData.params" :data="setData.data"></dp-location>
			</block>
		</block>
	</view>
</template>
<script>
export default {
	props: {
		menuindex: { default: -1 },
		pagecontent: {},
		latitude: '',
		longitude: '',
	},
	methods: {
		getdata: function () {
			this.$emit('getdata');
		}
	}
}
</script>
